#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>

void GetChild(int signo)
{
  printf("get a signal : %d, pid: %d\n", signo, getpid());
}

int main()
{

  //signal(SIGCHLD, GetChild);
  signal(SIGCHLD, SIG_IGN);
  pid_t pid = fork();

  if(pid == 0) {
    int cnt = 5;
    while(cnt)
    {
      printf("i am child:%d\n", getpid());
      sleep(1);
      cnt--;
    }
    exit(0);
  }
  while(1);
  return 0;
}
